Very Fast YACC-Compatible Parsers (For Very Little Effort)

نویسندگان

  • Achyutram Bhamidipaty
  • Todd A. Proebsting
چکیده

We have developed a yacc-compatible parser generator that creates parsers that are 2.5 to 6.5 times faster than those generated by yacc or bison. Our tool, mule, creates directly-executable, hard-coded parsers in ANSI C; yacc produces interpreted, table-driven parsers. Hard-coding LR parsers for speed is not a new idea. Two attributes distinguish mule from other parser generators that create hard-coded LR parsers: mule is compatible with yacc (including yacc's peculiar error recovery mechanisms), and mule does absolutely none of the complex automata analysis of previous hard-coded-parser generators. Mule creates simple, fast parsers after very little analysis.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

How to improve the performance of YECC-generated Erlang (JAM) parsers

In the paper mentioned earlier [2], the authors describe how they achieve a significant speed up for YACC generated parsers using their method. What they have done is to generate directly, executable, hard-coded parsers. This is in contrast to the standard YACC method of generating interpreted, table-driven parsers. This alternative way of generating parsers seems to be very promising for parse...

متن کامل

Lalr - A Generator for Efficient Parsers

1 SUMMARY Lalr is a parser generator that generates very fast and powerful parsers. The design goals have been to generate portable, table-drivenparsers that areasefficient as possible and which include all the features needed for practical applications. Like Yacc it accepts LALR(1) grammars, resolves ambiguities with precedence and associativ-ity of operators, generates table-drivenp arsers, a...

متن کامل

Programming Research Group A PRETTIER COMPILER-COMPILER: GENERATING HIGHER ORDER PARSERS IN C

Top-down (LL) parsers are easy to express in functional programming languages, but the elegant functional programming model can also serve as an exact prototype for a `real' implementation of the technology in ansi C. The result is a compiler-compiler that takes unlimited lookahead and backtracking, the extended BNF notation, and parameterized grammars with (higher order) metaparameters to the ...

متن کامل

A PREttier Compiler-Compiler: Generating Higher-order Parsers in C

Top-down (LL) context-sensitive parsers with integrated synthesis and use of attributes are easy to express in functional programming languages, but the elegant functional programming model can also serve as an exact prototype for a more efficient implementation of the technology in ANSI C. The result is a compiler-compiler that takes unlimited lookahead and backtracking, the extended BNF notat...

متن کامل

The PRECC Compiler Compiler

PRECC is a UNIX utility that has been designed to extend the capabilities of the familiar LEX and YACC front-end design and implementation tools. The utility is a compiler-compiler that takes unlimited lookahead and backtracking, the extended BNF notation, and parametrized grammars with (higher order) meta-parameters to the world of C programming. The generated code is standard ANSI C and is `p...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Softw., Pract. Exper.

دوره 28  شماره 

صفحات  -

تاریخ انتشار 1998